package com.techsen.tsweb.sys.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.techsen.tsweb.core.service.impl.BaseService;
import com.techsen.tsweb.sys.dao.OperDao;
import com.techsen.tsweb.sys.domain.Oper;
import com.techsen.tsweb.sys.service.OperService;

@Service
public class OperServiceImpl extends BaseService<Oper, OperDao> implements OperService {

    @Resource @Override
    public void setDao(OperDao dao) {
        this.dao = dao;
    }

    /**
     * 根据用户ID获取授权给这个用户的操作资源ID集合<br/>
     * 1. 按用户授权<br/>
     * 2. 按角色授权<br/>
     */
    @Override
    public List<String> getAuthorizedOperIdsByUserId(String userId) {
        return this.dao.getAuthorizedOperIdsByUserId(userId);
    }

}
